<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" href="/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>河码桌面</title>
    <style>
      .init-spinning {
        position: absolute;
        margin: auto;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        width: 6.25em;
        height: 6.25em;
        animation: spinningRotate 2.4s linear infinite;
        z-index: 999999;
      }
      .init-spinning .white {
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        animation: spinningFlash 2.4s linear infinite;
        opacity: 0;
      }
      .init-spinning .dot {
        position: absolute;
        margin: auto;
        width: 2.4em;
        height: 2.4em;
        border-radius: 100%;
        transition: all 1s ease;
      }
      .init-spinning .dot:nth-child(2) {
        top: 0;
        bottom: 0;
        left: 0;
        background: #ff4444;
        animation: spinningDotsY 2.4s linear infinite;
      }
      .init-spinning .dot:nth-child(3) {
        left: 0;
        right: 0;
        top: 0;
        background: #ffbb33;
        animation: spinningDotsX 2.4s linear infinite;
      }
      .init-spinning .dot:nth-child(4) {
        top: 0;
        bottom: 0;
        right: 0;
        background: #99cc00;
        animation: spinningDotsY 2.4s linear infinite;
      }
      .init-spinning .dot:nth-child(5) {
        left: 0;
        right: 0;
        bottom: 0;
        background: #33b5e5;
        animation: spinningDotsX 2.4s linear infinite;
      }

      @keyframes spinningRotate {
        0% {
          transform: rotate(0);
        }
        10% {
          width: 6.25em;
          height: 6.25em;
        }
        66% {
          width: 2.4em;
          height: 2.4em;
        }
        100% {
          transform: rotate(360deg);
          width: 6.25em;
          height: 6.25em;
        }
      }

      @keyframes spinningDotsY {
        66% {
          opacity: 0.1;
          width: 2.4em;
        }
        77% {
          opacity: 1;
          width: 0;
        }
      }
      @keyframes spinningDotsX {
        66% {
          opacity: 0.1;
          height: 2.4em;
        }
        77% {
          opacity: 1;
          height: 0;
        }
      }

      @keyframes spinningFlash {
        33% {
          opacity: 0;
          border-radius: 0%;
        }
        55% {
          opacity: 0.6;
          border-radius: 100%;
        }
        66% {
          opacity: 0;
        }
      }
    </style>
  </head>

  <body>
    <div class="init-spinning" id="initSpinningId">
      <div class="dot white"></div>
      <div class="dot"></div>
      <div class="dot"></div>
      <div class="dot"></div>
      <div class="dot"></div>
    </div>

    <script type="text/javascript">
      ;(function initialize() {
        let initSpinningObj = document.getElementById('initSpinningId')
        initSpinningObj.style.display = 'block'
        document.onreadystatechange = function () {
          if (document.readyState == 'complete') {
            const timer = setTimeout(() => {
              initSpinningObj.style.display = 'none'
              clearTimeout(timer)
            }, 88)
          }
        }
      })()
    </script>
    <div id="app"></div>
    <script type="module" src="/src/main.ts"></script>
  </body>
</html>
